
		The SARACEN's Item Flags v2.4

The DMFlags console variable was already part of the game, but it was undocumented,
and its functionality was greatly reduced by comparison to its role in Quake II. I
have added three new values to this variable, and also added five new variables to
expand the server's control over Items spawing within the game.

dmflags = Deathmatch Flags. This is an all-purpose variable that controls six aspects
		of the game. The original three values added by id Software allowed the
		server to prevent the use of the Zoom function, to turn footstep sounds
		on or off, and to allow players to fall long distances without getting
		hurt. The three new functions allow the server to prevent the spawning
		of Health, and/or armor, and to set it so that weapons respawn instantly
		after being picked up, but can only be picked up by players that don't
		already have that weapon (known as Weapons Stay).

wpflags = Weapon Prevention Flags. If flag is set, no ammo will be spawned for that
		weapon, nor shall the weapon itself be spawned. Reason: some pussies
		don't like some weapons.
wiflags = Weapon Initialise Flags. If flag is set, this weapon will never appear in
		that level, regardless of whether or not there is any ammo. Reason: you
		will already be carrying this weapon (with ammo) upon spawning! In a
		Team Deathmatch game, the amount of that weapon's ammo you spawn with
		will be half as much as in every other game type (id's idea, not mine).
		(players will never spawn with prevented weapons)
		(for obvious reasons, this defaults to 3)
waflags = Weapon Ammo Flags. If flag is set, no ammo will be spawned for that weapon.
		Reason: you won't need it because that ammo will be UNLIMITED!!!
		(has no effect upon Gauntlet or Grappling Hook)
		(it's pointless to flag a weapon here that's already been prevented with
			wpflags)

ppflags = Powerup Prevention Flags. If flag is set, that powerup/carried item will
		not be spawned. Reason: some pussies don't like some powerups.
piflags = Powerup Initialise Flags. If flag is set, players will spawn with that
		powerup item already active, to last for 30 seconds (the Flight powerup
		is also 30 seconds). For carried items, the server will choose a random
		one from those that are flagged; if only one carried item is flagged,
		all players will always spawn with that item.
		(players can still spawned with a prevented powerup/carried item)
		

The actual flag values are:
        Weapons         |          Powerups           |          DMFlags
------------------------+-----------------------------+------------------------------
Gauntlet         =   1  |  Personal Teleporter =   1  |  Prevent Health Spawning =  1
Shotgun          =   2  |  Medkit              =   2  |  Prevent Armor Spawning  =  2
Machinegun       =   4  |-----------------------------|  Weapons Stay            =  4
Grenade Launcher =   8  |  Quad Damage         =   4  |  No Falling Damage       =  8
Rocket Launcher  =  16  |  Battle Suit         =   8  |  Fixed Field-of-view     = 16
Lightning Gun    =  32  |  Speed               =  16  |  No Footstep Sounds      = 32
Railgun          =  64  |  Invisibility        =  32  |
Plasma Gun       = 128  |  Regeneration        =  64  |
BFG10K           = 256  |  Flight              = 128  |
Grappling Hook   = 512  |                             |

Simply add the relevant flags together and set that as the console value, eg to ban
the BFG and the Rocket Launcher (ya pussy) just go:

16 + 256 = 272
set wpflags 272

If you want players to spawn with either a Speed, Invisibility or Flight, and either
one of the two carried items, it's:

1 + 2 + 16 + 32 + 128 = 179
set piflags 179

And to ban all Armor, make Weapons Stay, and turn off Falling Damage, it's:

2 + 4 + 8 = 14
set dmflags 14

Just think of the possibilities:
- Everyone spawns with 30 seconds of invulnerability (prevent respawn camping)
- Everyone spawns with Railguns and nothing else (WIFlags defaults to 3, but it
doesn't have to!), and unlimited Slugs! No Health or Armor allowed, and no
falling damage? We can do that, too!
- Use your imagination!

The server can change the values of these variables at any time - the game should
fully adjust within about 30 seconds.

There is also code included for a menu system - it adds a new button in the Game
Server menu (Multiplayer->Create->Next...) which currently uses the "Specify" pic
(this can be changed, of course!), and loads up a brand new level where you can
control all of the above flags with the click of a mouse.

====================================================================================

The following files contain the code.

cgame/cg_draw.c
cgame/cg_playerstate.c
cgame/cg_predict.c

game/g_client.c
game/g_combat.c
game/g_items.c
game/g_local.h
game/g_main.c

ui/ui.q3asm
ui/ui_itemflags.c	<- This one is brand new, but has few comments
ui/ui_local.h
ui/ui_startserver.c

Search for entries marked with:		// The SARACEN

====================================================================================

Added in version 1.0:
	WPFlags - choose which weapons never spawn in the game
	WIFlags - choose which weapons the player spawns with
Added in version 1.5:
	PPFlags - choose which powerups/carried items never spawn in the game
	PIFlags - choose which powerups/carried items the player spawns with
Added in version 1.8:
	WAFlags - choose which weapons have unlimited ammo (includes cgame stuff)
Added in version 1.9:
	Documentation of DMFlags, plus three new values for DMFlags
Added in version 2.0:
	Menu configuration system!
Added in version 2.5:
	Re-wrote menu system, which now includes direct support for Modules code

Like it? Bugs? Email thesaracen@ozemail.com.au or ICQ 59037191

====================================================================================

This is open source. Anyone who wishes to incorporate these Item Flags into their
own mods may do so, just please give me credit. Just be advised that weapon values
will change if you add a new one in the middle of the list, eg a Flamethrower added
between the Rocket Launcher and the Lightning Gun will be 32, and the Lightning Gun
will be bumped up to 64, with all others bumped up to the next value. The same goes
for Powerups and Carried Items, and Carried Items will always come before Powerups.
